package ldh.im.fxbase.rpc.service;

import ldh.im.dto.business.av.AvData;
import ldh.im.dto.business.av.ChatDataReq;
import ldh.im.dto.business.av.AvGroupAddReq;
import ldh.im.dto.business.av.AvGroupCreateReq;
import ldh.im.dto.business.av.AvGroupExitReq;
import ldh.im.dto.business.item.ChatUserItemList;
import ldh.im.dto.business.user.AvLogin;
import ldh.im.dto.business.user.LoginResp;
import ldh.rpc.Rpc;
import ldh.rpc.RpcMapper;
import ldh.rpc.exception.RpcException;

@Rpc
public interface RpcAvService {

    /**
     * av 登录
     * @param avLogin
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avLogin")
    LoginResp login(AvLogin avLogin) throws RpcException;

    /**
     * 建临时群
     * @param avGroupCreateReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avGroupCreate")
    String createGroup(AvGroupCreateReq avGroupCreateReq)  throws RpcException;

    /**
     * 退出临时群
     * @param avGroupExitReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avGroupExit")
    String exitGroup(AvGroupExitReq avGroupExitReq)  throws RpcException;

    /**
     * 邀请人进群
     * @param avGroupAddReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avGroupAdd")
    ChatUserItemList addGroup(AvGroupAddReq avGroupAddReq)  throws RpcException;

    /**
     * 聊天请求
     * @param chatDataReq
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avChat")
    ChatUserItemList avChat(ChatDataReq chatDataReq) throws RpcException;

    /**
     * 发送语音、视频数据
     * @param avData
     * @return
     * @throws RpcException
     */
    @RpcMapper(path = "avData")
    ChatUserItemList sendAvData(AvData avData) throws RpcException;
}
